<?

if($errorMsg) {
  include ('errorMsg.html');
}
if($okMsg) {
include ('okMsg.html');
}

?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><font class="text"><b><?=translate('view_affiliates');?></b></font></td>
  </tr>
<tr>
    <td>
      <p><br>
      <?=translate('view_affiliates_desc');?>
    <a href='http://www.resellerspanel.com/?a=<?=$userName?>' target='_blank'>http://www.resellerspanel.com/?a=<?=$userName?>
        </a>
<br>
        <br>
        <?=translate('banners_and_promo');?>:<br>
        <br>
        <font class="text"><a href="banners_page1.html" onClick="show_help('banners_page1.html')" target="_blank"><?=translate('banners_page1');?></a> | <a href="banners_page2.html" onClick="show_help('banners_page2.html')" target="_blank"><?=translate('banners_page2');?></a> | <a href="banners_page3.html" onClick="show_help('banners_page3.html')" target="_blank"><?=translate('banners_page3');?></a></font><br>
        <br>
      </p>
      </td>
  </tr>
</table>

<TABLE border=1 class='bTable' cellspacing='0' width='450'>
<?
$data = get_refered_sales_stats_detailed($id);
if($data){
	echo "<TR>
		   <TH>" . translate('affiliate') . "</TH>
		   <TH>" . translate('packets_sold') . "</TH>
		   <TH>" . translate('price') . "</TH>
		   <TH>" . translate('wholesale_price') . "</TH>
		   <TH>" . translate('commission') . "</TH>
		 </TR>
	";
	echo $data;
}else{
	echo "<TR><TD>" . translate('empty_list') . ".</TD></TR>";
}
?>
</TABLE>
